

set matsize 1800
set more off
capture log close
log using demo_subv_adm_log.txt, replace t

*******************************************
* American Political Science Review       *
* Democratic Subversion                   *
* Leonardo Arriola, Jed DeVaro, Anne Meng *
* 7 June 2021                             *
*******************************************

/******************************************REPLICATION CODE & DATA OUTPUT

All analyses were conducted in Stata 14.2.

Filenames: 
demo_subv_adm_code.do
demo_subv_adm_data.dta
demo_subv_adm_log.log

Data Note: Stata commands 'outreg2' and 'psacalc' may need to be downloaded. 
For questions, contact: larriola@berkeley.edu or ameng@virginia.edu.

File Output: 
(1) main_table1.doc [Article Table 1]
(2) main_table2.doc [Article Table 2]
(3) table_appendix3.doc [Appendix Table 3]
(4) table_appendix4.doc [Appendix Table 4]
(5) see output in log [Appendix Table 5] 
(6) table_appendix6.doc [Appendix Table 6]
(7) table_appendix7.doc [Appendix Table 7]
(8) table_appendix8.doc [Appendix Table 8]
(9) table_appendix9.doc [Appendix Table 9]
(10) table_appendix10.doc [Appendix Table 10]
(11) table_appendix11.doc [Appendix Table 11]
(12) table_appendix12.doc [Appendix Table 12]
(13) table_appendix13.doc [Appendix Table 13]
(14) table_appendix14.doc [Appendix Table 14]
(15) table_appendix15.doc [Appendix Table 15]
(16) table_appendix16.doc [Appendix Table 16]
(17) table_appendix17.doc [Appendix Table 17]
(18) table_appendix18.doc [Appendix Table 18]
(19) table_appendix19.doc [Appendix Table 19]
(20) table_appendix20.doc [Appendix Table 20]
(21) table_appendix21.doc [Appendix Table 21]
(22) table_appendix22.doc [Appendix Table 22]
(23) table_appendix23.doc [Appendix Table 23]
(24) table_appendix24.doc [Appendix Table 24]
(25) table_appendix25.doc [Appendix Table 25]
(26) table_appendix26.doc [Appendix Table 26]
(27) table_appendix27.doc [Appendix Table 27]
(28) table_appendix28.doc [Appendix Table 28]


********************************************/


********** VARIABLE DEFINITIONS ************

describe


********************************************
* TABLE 1                                  *
* DV: NUMBER PRESIDENTIAL CANDIDATES       *
********************************************

xtset ccode year, yearly

reg prescands opp_dummy, cluster(ccode)
outreg2 using main_table1.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_dummy v2xps_party party_pastfounder govlegcoal, cluster(ccode)
outreg2 using main_table1.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_dummy v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, cluster(ccode)
outreg2 using main_table1.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append

reg prescands opp_prop, cluster(ccode)
outreg2 using main_table1.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 4) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal, cluster(ccode)
outreg2 using main_table1.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 5) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, cluster(ccode)
outreg2 using main_table1.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 6) append


********************************************
* TABLE 2                                  *
* DV: OPPOSITION APPTS TO CABINET          *
********************************************

reg future_opp_prop winner_voteshare, cluster(ccode)
outreg2 using main_table2.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 7) replace

reg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal, cluster(ccode)
outreg2 using main_table2.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 8) append

reg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, cluster(ccode)
outreg2 using main_table2.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 9) append


********************************************
* APPENDIX 3                               *
* DESCRIPTIVE STATISTICS                   *
********************************************

outreg2 using table_appendix3.doc, replace sum(log) keep(prescands prescands05pct prescands1pct opp_dummy opp_prop v2xps_party party_pastfounder govlegcoal trs50 ethfearon ethposner v2elprescons v2x_libdem v2x_polyarchy reve_fh_pr boycott rebel_notlib liberation lngdp lnpop ln_oil avgseats incumb_win winner_voteshare)


********************************************
* APPENDIX 4                               *
* ALTERNATE MODELS                         *
********************************************

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal, cluster(ccode)
outreg2 using table_appendix4.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Pooled) replace

xtreg prescands opp_prop v2xps_party party_pastfounder govlegcoal, re r
outreg2 using table_appendix4.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Random) append

xtreg prescands opp_prop v2xps_party party_pastfounder govlegcoal, fe r
outreg2 using table_appendix4.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Fixed) append

reg diff_pres diff_opp diff_partysystem diff_founderparty diff_govlegcoal, cluster(ccode)
outreg2 using table_appendix4.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Detrend) append


********************************************
* APPENDIX 5                               *
* SENSITIVITY ANALYSIS                     *
********************************************

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, cluster(ccode)
psacalc delta opp_prop, rmax(0.4)
psacalc delta opp_prop, rmax(0.5)
psacalc delta opp_prop, rmax(0.6)
psacalc delta opp_prop, rmax(0.7)

********************************************
* APPENDIX 6                               *
* NUMBER PRESIDENTIAL CANDIDATE            *
********************************************

xtreg prescands opp_prop, re r
outreg2 using table_appendix6.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

xtreg prescands opp_prop v2xps_party party_pastfounder govlegcoal, re r
outreg2 using table_appendix6, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

xtreg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, re r
outreg2 using table_appendix6.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 7                               *
* BOYCOTTED ELECTIONS                      *
********************************************

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil boycott, cluster(ccode)
outreg2 using table_appendix7.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Control for Boycotts) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if boycott==0, cluster(ccode)
outreg2 using table_appendix7.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Exclude Boycotts) append


********************************************
* APPENDIX 8                               *
* SUBSTITUTE FEARON ETHNIC FRACT           *
********************************************

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethfearon v2elprescons v2x_libdem lngdp lnpop ln_oil, cluster(ccode)
outreg2 using table_appendix8.doc, aster(coef) alpha(0.01, 0.05, 0.10) replace


********************************************
* APPENDIX 9                               *
* SUBSTITUTE VDEM ELEC DEM & FH POL RGHTS  *
********************************************

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_polyarchy lngdp lnpop ln_oil, cluster(ccode)
outreg2 using table_appendix9.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(V-Dem Electoral Democracy) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons reve_fh_pr lngdp lnpop ln_oil, cluster(ccode)
outreg2 using table_appendix9.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Freedom House Political Rights) append

********************************************
* APPENDIX 10                               *
* CONTROL FOR CABINET SIZE                 *
********************************************

reg prescands opp_prop avgseats, cluster(ccode)
outreg2 using table_appendix10.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal avgseats, cluster(ccode)
outreg2 using table_appendix10.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil avgseats, cluster(ccode)
outreg2 using table_appendix10.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 11                              *
* DROP FIRST POST-COLD WAR ELECTION        *
********************************************

reg prescands opp_prop if count!=1, cluster(ccode)
outreg2 using table_appendix11.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal if count!=1, cluster(ccode)
outreg2 using table_appendix11.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if count!=1, cluster(ccode)
outreg2 using table_appendix11.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 12                              *
* LAG PRESIDENTIAL CANDIDATES              *
********************************************

reg prescands opp_prop lag_prescands, cluster(ccode)
outreg2 using table_appendix12.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal lag_prescands, cluster(ccode)
outreg2 using table_appendix12.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil lag_prescands, cluster(ccode)
outreg2 using table_appendix12.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 13                              *
* LIMIT PRES CANDS TO >= .05% & 1%         *
********************************************

reg prescands05pct opp_prop, cluster(ccode)
outreg2 using table_appendix13.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands05pct opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, cluster(ccode)
outreg2 using table_appendix13.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands1pct opp_prop, cluster(ccode)
outreg2 using table_appendix13.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append

reg prescands1pct opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, cluster(ccode)
outreg2 using table_appendix13.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 4) append


********************************************
* APPENDIX 14                              *
* FRAUD + VIOLENCE                         *
********************************************

reg  opp_prop  v2elfrfair_ord v2elpeace, cluster(ccode)
outreg2 using table_appendix14.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Opposition Cooptation) replace


reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil v2elfrfair_ord v2elpeace, cluster(ccode)
outreg2 using table_appendix14.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Control for Fraud & Violence) append


********************************************
* APPENDIX 15                              *
* CAMPAIGN/PARTY CONTROLS                  *
********************************************

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil v2eldonate v2elpubfin, cluster(ccode)
outreg2 using table_appendix15.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil v2psbars v2elrstrct_v2, cluster(ccode)
outreg2 using table_appendix15.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil v2elfrcamp v2elpdcamp v2elpaidig wdi_internet, cluster(ccode)
outreg2 using table_appendix15.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil v2eldonate v2elpubfin v2elrstrct_v2 v2psbars v2elfrcamp v2elpdcamp v2elpaidig wdi_internet, cluster(ccode)
outreg2 using table_appendix15.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 4) append


********************************************
* APPENDIX 16                              *
* LIMIT SAMPLE TO LESS INSTITUTIONALIZED   *
********************************************

reg prescands opp_prop if v2xps_party< .47, cluster(ccode)
outreg2 using table_appendix16.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal if v2xps_party< .47, cluster(ccode)
outreg2 using table_appendix16.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if v2xps_party< .47, cluster(ccode)
outreg2 using table_appendix16.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 17                              *
* LIMIT SAMPLE TO RUNOFF SYSTEMS           *
********************************************

reg prescands opp_prop if trs50==1, cluster(ccode)
outreg2 using table_appendix17.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal if trs50==1, cluster(ccode)
outreg2 using table_appendix17.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if trs50==1, cluster(ccode)
outreg2 using table_appendix17.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 18                              *
* LIMIT SAMPLE TO FIRST-ROUND ONLY ELECTS  *
********************************************

reg prescands opp_prop if secround==0, cluster(ccode)
outreg2 using table_appendix18.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal if secround==0, cluster(ccode)
outreg2 using table_appendix18.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if secround==0, cluster(ccode)
outreg2 using table_appendix18.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


*********************************************
* APPENDIX 19                               *
* LIMIT SAMPLE TO RUNOFF & FIRST ROUND ONLY *
*********************************************

reg prescands opp_prop if trs50==1 & secround==0, cluster(ccode)
outreg2 using table_appendix19.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal if trs50==1 & secround==0, cluster(ccode)
outreg2 using table_appendix19.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if trs50==1 & secround==0, cluster(ccode)
outreg2 using table_appendix19.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


*********************************************
* APPENDIX 20                               *
* INCUMB VICTORY UNDER RUNOFF               *
*********************************************

reg incumb_win prescands v2xps_party party_pastfounder govlegcoal ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if trs50==1, cluster(ccode)
outreg2 using table_appendix20.doc, aster(coef) alpha(0.01, 0.05, 0.10) replace


*********************************************
* APPENDIX 21                               *
* INCUMB VICTORY UNDER SECOND ROUND         *
*********************************************

reg incumb_win incumb_vote opp_prop if trs50==1 & secround==1, cluster(ccode)
outreg2 using table_appendix21.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg incumb_win incumb_vote opp_prop v2xps_party party_pastfounder govlegcoal ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if trs50==1 & secround==1, cluster(ccode)
outreg2 using table_appendix21.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append


*********************************************
* APPENDIX 22                               *
* POWERSHARING                              *
*********************************************

reg prescands opp_prop if dominantparty==1, cluster(ccode)
outreg2 using table_appendix22.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg prescands opp_prop v2xps_party party_pastfounder i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if dominantparty==1, cluster(ccode)
outreg2 using table_appendix22.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg prescands opp_prop if dominantparty==0, cluster(ccode)
outreg2 using table_appendix22.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 23                              *
* POST-CONFLICT REGIMES                    *
********************************************

reg opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil rebel_notlib, cluster(ccode)
outreg2 using table_appendix23.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Post-Conflict Cooptation) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil rebel_notlib, cluster(ccode)
outreg2 using table_appendix23.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Control for Post-Conflict) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if rebel_notlib==0, cluster(ccode)
outreg2 using table_appendix23.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Exclude Post-Conflict) append


********************************************
* APPENDIX 24                              *
* LIBERATION REGIMES                       *
********************************************

reg opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil liberation, cluster(ccode)
outreg2 using table_appendix24.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Liberation Cooptation) replace

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil liberation, cluster(ccode)
outreg2 using table_appendix24.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Control for Liberation) append

reg prescands opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if liberation==0, cluster(ccode)
outreg2 using table_appendix24.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Exclude Liberation Regime) append


********************************************
* APPENDIX 25                              *
* OPPOSITION APPTS EXCLUDE BOYCOTTS        *
********************************************

reg future_opp_prop winner_voteshare if boycott==0, cluster(ccode)
outreg2 using table_appendix25.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

reg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal if boycott==0, cluster(ccode)
outreg2 using table_appendix25.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

reg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if boycott==0, cluster(ccode)
outreg2 using table_appendix25.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 26                              *
* OPPOSITION APPTS TO CABINET              *
********************************************

reg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal, cluster(ccode)
outreg2 using table_appendix26.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Pooled OLS) replace

xtreg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal, re r
outreg2 using table_appendix26.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Random Effects) append

xtreg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal, fe r
outreg2 using table_appendix26.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Fixed Effects) append

reg diff_future_opp diff_winner diff_partysystem diff_founderparty diff_govlegcoal, cluster(ccode)
outreg2 using table_appendix26.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Detrended) append

 
********************************************
* APPENDIX 27                              *
* OPPOSITION APPTS TO CABINET              *
********************************************

xtreg future_opp_prop winner_voteshare, re r
outreg2 using table_appendix27.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 1) replace

xtreg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal, re r
outreg2 using table_appendix27.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 2) append

xtreg future_opp_prop winner_voteshare v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil, re r
outreg2 using table_appendix27.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Model 3) append


********************************************
* APPENDIX 28                              *
* INCUMB VICTORY W/COOPTATION              *
********************************************

reg incumb_win prescands v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil  if incumb_vote<.60, cluster(ccode)
outreg2 using table_appendix28.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Fragmentation) replace

reg incumb_win opp_prop v2xps_party party_pastfounder govlegcoal i.trs50##c.ethposner v2elprescons v2x_libdem lngdp lnpop ln_oil if incumb_vote<.60, cluster(ccode)
outreg2 using table_appendix28.doc, aster(coef) alpha(0.01, 0.05, 0.10) ctitle(Cooptation) append


log close

clear





